HTMLify
style.css
Views: 18 | Author: cody
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 | :root { --bgColor: white; --inputColor: black; --outlineColor: dodgerblue; --beamColor: yellow; --spacer: 1rem; } * { box-sizing: border-box; } html, body { height: 100%; } body { display: grid; place-items: center; background: var(--bgColor); } body.show-password { --bgColor: black; --inputColor: white; --outlineColor: var(--beamColor); } form { transform: translate3d(0, 0, 0); padding: var(--spacer); } form > * + * { margin-top: var(--spacer); } .form-item > * + * { margin-top: 0.5rem; } label, input, button { font-size: 1.5rem; font-family: monospace; color: var(--inputColor); } label:focus, input:focus, button:focus { outline: 3px solid var(--outlineColor); outline-offset: 2px; } label::-moz-focus-inner, input::-moz-focus-inner, button::-moz-focus-inner { border: none; } label[id=password], input[id=password], button[id=password] { color: black; } button { border: none; } [id=submit] { cursor: pointer; margin: calc(var(--spacer) * 2) 0 0 2px; padding: 0.75rem 1.25rem; color: var(--bgColor); background-color: var(--inputColor); box-shadow: 4px 4px 0 rgba(30, 144, 255, 0.2); } [id=submit]:active { transform: translateY(1px); } .input-wrapper { position: relative; } input { padding: 0.75rem 4rem 0.75rem 0.75rem; width: 100%; border: 2px solid transparent; border-radius: 0; background-color: transparent; box-shadow: inset 0 0 0 2px black, inset 6px 6px 0 rgba(30, 144, 255, 0.2), 3px 3px 0 rgba(30, 144, 255, 0.2); -webkit-appearance: none; } input:focus { outline-offset: 1px; } .show-password input { box-shadow: inset 0 0 0 2px black; border: 2px dashed white; } .show-password input:focus { outline: none; border-color: var(--beamColor); } [id=eyeball] { --size: 1.25rem; display: flex; align-items: center; justify-content: center; cursor: pointer; outline: none; position: absolute; top: 50%; right: 0.75rem; border: none; background-color: transparent; transform: translateY(-50%); } [id=eyeball]:active { transform: translateY(calc(-50% + 1px)); } .eye { width: var(--size); height: var(--size); border: 2px solid var(--inputColor); border-radius: calc(var(--size) / 1.5) 0; transform: rotate(45deg); } .eye:before, .eye:after { content: ""; position: absolute; top: 0; right: 0; bottom: 0; left: 0; margin: auto; border-radius: 100%; } .eye:before { width: 35%; height: 35%; background-color: var(--inputColor); } .eye:after { width: 65%; height: 65%; border: 2px solid var(--inputColor); border-radius: 100%; } [id=beam] { position: absolute; top: 50%; right: 1.75rem; -webkit-clip-path: polygon(100% 50%, 100% 50%, 0 0, 0 100%); clip-path: polygon(100% 50%, 100% 50%, 0 0, 0 100%); width: 100vw; height: 25vw; z-index: 1; mix-blend-mode: multiply; transition: transform 200ms ease-out; transform-origin: 100% 50%; transform: translateY(-50%) rotate(var(--beamDegrees, 0)); pointer-events: none; } .show-password [id=beam] { background: var(--beamColor); } |